package Finance::NSCC::Insurance::Schema::TransUnderlyingAsset;

use strict;
use warnings;

use base 'DBIx::Class';

__PACKAGE__->load_components("Core");
__PACKAGE__->table("trans_underlying_assets");
__PACKAGE__->add_columns(
  "trans_id",
  { data_type => "INT", default_value => "", is_nullable => 0, size => 10 },
  "cusip",
  { data_type => "CHAR", default_value => "", is_nullable => 0, size => 9 },
  "fund_id",
  { data_type => "CHAR", default_value => "", is_nullable => 0, size => 5 },
  "sub_fund_id",
  { data_type => "CHAR", default_value => "", is_nullable => 0, size => 5 },
  "fund_amt",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 16,
  },
  "mva_amt",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 16,
  },
  "employer_amt",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 16,
  },
  "emplyee_amt",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 16,
  },
  "sund_surrender_chg",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 16,
  },
  "fund_admin_chg",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 16,
  },
  "fund_unit_price",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 15,
  },
  "mutual_fund_cusip",
  { data_type => "CHAR", default_value => undef, is_nullable => 1, size => 9 },
  "deposit_period_start_d",
  { data_type => "DATE", default_value => undef, is_nullable => 1, size => 10 },
  "deposit_period_end_d",
  { data_type => "DATE", default_value => undef, is_nullable => 1, size => 10 },
  "deposit_period_maturity_d",
  { data_type => "DATE", default_value => undef, is_nullable => 1, size => 10 },
  "deposit_period_rate",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 10,
  },
  "deposit_period_rate_type",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 2 },
  "deposit_period_duration",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 10,
  },
  "deposit_period_duration_q",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 2 },
  "employer_amt_id_q",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 4 },
  "employee_amt_id_q",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 4 },
);
__PACKAGE__->set_primary_key("trans_id", "cusip", "fund_id", "sub_fund_id");

__PACKAGE__->belongs_to(transaction => 'Finance::NSCC::Insurance::Schema::Transaction',
                        {'foreign.id' => 'self.trans_id'},
                       );
1;
